package com.huang.springboot.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 员工表
 * @author yili_gi
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("Employee实体类")
public class Employee {
    @ApiModelProperty("雇员id")
    private Integer id;
    @ApiModelProperty("雇员名字")
    private String lastName;
    @ApiModelProperty("雇员邮箱")
    private String email;

    /**
     * 性别 0：女 1：男
     */
    @ApiModelProperty("雇员性别")
    private Integer gender;

    /**
     * 用于获取department表的信息
     */
    @ApiModelProperty("所属部门id")
    private int departmentId;
    @ApiModelProperty("出生日期")
    private Date birth;

    /**
     * 储存department表中取得的信息
     * 在前端页面遍历部门信息是使用的也是这个
     */
    @ApiModelProperty("所属部门")
    private Department department;

    public Employee(Integer id,String lastName,String email,Integer gender,int departmentId,Date birth){
        this.id = id;
        this.lastName = lastName;
        this.email = email;
        this.gender = gender;
        this.departmentId = departmentId;
        this.birth = birth;
    }

}
